import { createAction } from 'redux-actions'
/* 
  01 可以发送请求获取数据 load_todo
  02 当异步操作完成之后需要触发新的指令
 */

// 获取 todo 列表的指令
export const load_todo = createAction('load_todo')
export const load_todo_success = createAction('load_todo_sucess')


// 添加 todo 的指令
export const add_todo = createAction('add_todo')
export const add_todo_success = createAction('add_todo_success')

// 删除 todo 指令
export const remove_todo = createAction('remove_todo')
export const remove_todo_success = createAction('remove_todo_success')

// 修改 todo 指令
export const modify_todo = createAction('modify_todo')
export const modify_todo_success = createAction('modify_todo_success')

// 过滤 todo 指令
export const modify_filter_todo = createAction('modify_filter_todo')

// 删除已完成 todo 指令
export const clear_todo = createAction('clear_todo')
export const clear_todo_success = createAction('clear_todo_success')


// 任务名称修改指令
export const modify_todo_edit = createAction('modify_todo_edit')
export const modify_todo_edit_success = createAction('modify_todo_edit_success')

// 修改任务名称指令
export const modify_todo_name = createAction('modify_todo_name')
export const modify_todo_name_success = createAction('modify_todo_name_success')